<script>

export default {
  name: 'LatestCard',
  props: [
    'shu'
  ],
  created () {
    // console.log(this.shu)
  },
  mounted () {
    // console.log(this.$store.state.bowen)
  },
  methods: {
    todetail () {
      this.$router.push({
        name: 'detail',
        params: {
          bowenid: this.shu.id
        }
      })
    }
  }
}
</script>

<template>
  <div class="lc" @click="todetail">
    <div class="card1">
      <div class="c1">
        <img :src="shu.imgurl" alt="">
      </div>
      <div class="text">
        <div> {{ shu.title }}</div>
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
$bgd: rgba(0, 0, 0, 0.5);
$hoverbgd: rgba(0, 0, 0, 0.7);
$textcol: white;
.lc {
  box-sizing: border-box;
  //border: 1px solid #003153;
  padding: 2px;
  height: 100px;
  transition: all .5s;
  max-width: 360px;
  //width: 350px;
  border-radius: 30px;
  margin-bottom: 5px;
  //background-color: $bgd;
  overflow: hidden;

  .card1 {
    display: flex;
    align-items: center;

    .c1 {
      border-radius: 30px;
      overflow: hidden;
      height: 86px;
      width: 163px;
      @media (max-width: 1400px) {
        &.c1 {
          width: 10vw;
        }
      };
    }

    img {
      width: 163px;
      transition: all .5s;
      height: 86px;
      @media (max-width: 1400px) {
        & {
          width: 10vw;
        }
      }
    }

    img:hover {
      transform: scale(1.05);
    }
  }

  &:hover {
    box-shadow: 5px 5px 5px #003153;
    background: $hoverbgd;
    transform: scale(0.95);
    cursor: pointer;
    border: 2px solid $hoverbgd;
  }
}

.text {
  margin-left: 10px;
  font-size: 13px;
  font-weight: bold;
  color: $textcol;
  //transform: translateX(-100px);
}
</style>
